import Vue from 'vue'
import VueRouter from 'vue-router'
import home from '@/components/home.vue'
import news from '@/components/news.vue'
import aboutus from '@/components/aboutus.vue'
import contactus from '@/components/contactus.vue'
import goodinfo from '@/components/goodinfo.vue'
import allgood from '@/components/allgoods.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: home,
  },
  {
    path: '/news',
    name: 'news',
    component: news,
  },
  {
    path: '/aboutus',
    name: 'aboutus',
    component: aboutus,
  },
  {
    path: '/contactus',
    name: 'contactus',
    component: contactus,
  },
  {
    path: '/goodinfo',
    name: 'goodinfo',
    component: goodinfo,
  },
  {
    path: '/allgoods',
    name: 'allgoods',
    component: allgood,
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes,
})

export default router
